﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 简单算法.字符串相关
{
    public static class 字符串反转
    {


        #region 暴力反转
        /// <summary>
        /// 暴力反转
        /// </summary>
        /// <param name="str">字符串</param>
        public static void 暴力反转(string str)
        {
            ///暴力反转，完全不考虑性能
            ///直接通过循环实现字符串反转
            ///
            string tempStr = "";
            for (int i = str.Length; i > 0; i--)
            {
                tempStr += str[i - 1];
            }
            Console.WriteLine(tempStr);
        }
        #endregion



    }
}
